﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace API_Service.DBHelper
{
    public class SqlServerCreator
    {
        public SqlServerCreator() { }

        private static IDbConnection dbConnection = null;

        public static IDbConnection SingletonConnection()
        {
            if (dbConnection == null)
            {
                dbConnection = new SqlConnection();
            }
            return dbConnection;
        }
        public static IDbConnection NewConnection()
        {
            return new SqlConnection();
        }
    }
}